<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>订单详情</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <style>
    body{background:#f8f9fa;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif}
    .card{max-width:600px;margin:40px auto;border:0;box-shadow:0 2px 10px rgba(0,0,0,.1)}
    .badge-unpay{background:#ff4757}.badge-pay{background:#2ed573}
    .btn-home{background:#6c757d;color:#fff}
  </style>
</head>
<body>
<div class="container">
  <div class="card">
    <div class="card-header text-center">
      <h4 class="mb-0">订单详情</h4>
    </div>
    <div class="card-body">
      <p><strong>订单编号：</strong><span th:text="${order.id}">123</span></p>
      <p><strong>商品名称：</strong><span th:text="${order.goodsName}">小米手环</span></p>
      <p><strong>购买数量：</strong><span th:text="${order.goodsCount}">1</span> 件</p>
      <p><strong>实付金额：</strong><span class="text-danger" th:text="'¥'+${order.goodsPrice}">¥99.00</span></p>
      <p><strong>下单时间：</strong><span th:text="${#temporals.format(order.createDate,'yyyy-MM-dd HH:mm:ss')}">2025-09-18 12:00:00</span></p>
      <p>
        <strong>支付状态：</strong>
        <span th:if="${order.status == 0}" class="badge badge-unpay">未支付</span>
        <span th:if="${order.status != 0}" class="badge badge-pay">已支付</span>
      </p>

      <div class="d-grid gap-2 mt-4">
        <a th:if="${order.status == 0}" href="javascript:alert('跳转到支付系统')" class="btn btn-danger">去支付</a>
        <a th:href="@{/goods}" class="btn btn-home">返回秒杀专场</a>
      </div>
    </div>
  </div>
</div>
</body>
</html>